package com.md.model.request.goods;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.md.util.StringUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 商品类别表
 *
 * @author 刘骄阳
 * 2022-03-11 16:59
 */
@Data
@ApiModel("商品分类")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class GoodsTypeRequest implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * 唯一标识id
   */
  @ApiModelProperty("唯一标识id")
  @JsonFormat(shape = JsonFormat.Shape.STRING)
  private Long id;

  /**
   * 商品类别名
   */
  @ApiModelProperty("商品类别名")
  private String name;

  /**
   * 显示顺序
   */
  @ApiModelProperty("显示顺序")
  private Integer sort;

  /**
   * 父级类别id
   */
  @ApiModelProperty("父级类别id")
  @JsonFormat(shape = JsonFormat.Shape.STRING)
  private Long parentId;

  @Override
  public String toString() {
    return StringUtil.objectToJson(this);
  }
}
